<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 *系统控制器文件
 *所有页面控制器 需要继承此类 
 *
 *
 */
class Controller extends MY_Controller {
	public function __construct()
	{
		parent::__construct();
		$this->_is_login();
		$this->_user_data();
	}

	public function _user_data()
	{
		if($this->G->user->login)
		{
			$this->load->model('payment_model');
			$t_var = $this->payment_model->lists(array('uid'=>$this->G->user->uid,'type'=>'0'),'count(id) as count');
			$this->G->user->order_count = $t_var['0']->count;
		}
		else
		{
			$this->G->user->order_count = 0;
		}
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */